/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Test;

/**
 *
 * @author minh
 */
public class combobox {
    // Create an array list to be filled with group names
//ArrayList<String> groupNames = new ArrayList<String>();
//String query = "SELECT group_name FROM customer ORDER BY group_name"; 
//PreparedStatement stm = connection.prepareStatement(query); 
//
//ResultSet rs = stm.executeQuery(query); 
//
//while (rs.next()) { 
//    String groupName = rs.getString("group_name"); 
//    // add group names to the array list
//    groupNames.add(groupName)
//} 
//
//rs.close(); 
//
//
//// Populate the combo box
//DefaultComboBoxModel model = new DefaultComboBoxModel(groupNames.toArray());
//comboBox.setModel(model);
//
//
//
//
//
//
//
//  ResultSet rs = stmt.executeQuery("Select * FROM SampleTable");
//            rs.first();
//            for(int i = 0; i <= 4; i ++)
//            {
//                jComboBox1.addItem(rs.getString("Name"));
//                rs.next();
//            }

}
